// 0pts

#include <algorithm>
#include <cmath>
#include <cstdio>
long long n;
inline void solve()
{
    scanf("%lld", &n);
    long long r = std::sqrt(n);
    long long answer = std::min(2 + n, 2 * r + 3);
    printf("%lld\n", answer);
}
int main()
{
    freopen("tree.in", "r", stdin);
    freopen("tree.out", "w", stdout);
    int t;
    scanf("%d", &t);
    for (int i = 1; i <= t; i++)
    {
        solve();
    }
    return 0;
}
